export default {
  namespaced: true,
  state: {
    // 页面文档可视高度(随窗口改变大小)
    documentClientHeight: 0,
    // 侧边栏, 菜单
    menuList: [],
    menuNameList: [],
    menuActiveName: ''
  },
  mutations: {
    updateDocumentClientHeight(state, height) {
      state.documentClientHeight = height
    },
    updateMenuList(state, list) {
      state.menuList = list
    },
    updateMenuNameList(state, list) {
      state.menuNameList = list
    },
    updateMenuActiveName(state, name) {
      state.menuActiveName = name
    }
  },
  getters: {
    siteContentViewHeight(state) {
      return state.documentClientHeight - 90
    }
  }
}
